
const axios = require('axios');
const HttpProxyAgent = require('https-proxy-agent');
const { PROXY_ADDRESS } = require('../config');

const httpsAgent = new HttpProxyAgent(PROXY_ADDRESS);

const chatGptService = axios.create({
    baseURL: 'https://api.openai.com',
    headers: {
        "Content-Type": "application/json",
    },
    proxy: false,
    httpsAgent,
    timeout: 60000
})

module.exports = {
    chatGptService
};